/**
 * Created by Handsome.Ho on 2015/9/30.
 */
angular.module('schedule.config', []).config(function ($stateProvider, $urlRouterProvider, cloudProvider, TaskServiceProvider) {

  TaskServiceProvider.cloudUrl = cloudProvider.cloudUrl = "http://localhost";

  $stateProvider
    .state("tab", {
      url: '/tab',
      templateUrl: "templates/tabs.html",
      abstract: true
    }).state("tab.month", {
      url: '/month',
      views: {
        month: {
          controller: 'scheduleCtrl',
          templateUrl: "templates/month.html"
        }
      }
    }).state("tab.cloud", {
      url: '/cloud',
      views: {
        cloud: {
          controller: 'cloudCtrl',
          templateUrl: "templates/cloud.html"
        }
      }
    }).state("tab.task", {
      url: '/task',
      views: {
        task: {
          controller: 'taskCtrl',
          templateUrl: "templates/tasks.html"
        }
      }
    });
  $urlRouterProvider.otherwise('/tab/month');
}).config(['$ionicConfigProvider', function ($ionicConfigProvider) {
  $ionicConfigProvider.tabs.position('bottom'); // other values: top
  $ionicConfigProvider.tabs.style("standard");
  $ionicConfigProvider.views.transition("ios");
}]);
